unit TeknikServisFiyat;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, FormClassEmptyList, Menus, DB, ADODB, ImgList, XPMan, StdActns,
  ActnList, StdCtrls, Buttons, fcLabel, Grids, Wwdbigrd, Wwdbgrid,
  ExtCtrls, fcStatusBar, wwdblook, Mask, wwdbedit, Wwdotdot, Wwdbcomb;

type
  TfmTeknikServisFiyat = class(TfmFormClassEmptyList)
    btDuzelt: TBitBtn;
    btKaydet: TBitBtn;
    lcBolum: TwwDBLookupCombo;
    Tekniktipi: TADOQuery;
    Tipi: TwwDBComboBox;
    HTipi: TwwDBComboBox;
    lcUstGrup: TwwDBLookupCombo;
    lcMarka: TwwDBLookupCombo;
    lcGrup: TwwDBLookupCombo;
    aqStokkod: TADOQuery;
    lcstok: TwwDBLookupCombo;
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure FormShow(Sender: TObject);
    procedure btDuzeltClick(Sender: TObject);
    procedure btKaydetClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  fmTeknikServisFiyat: TfmTeknikServisFiyat;

implementation
  uses data;
{$R *.dfm}

procedure TfmTeknikServisFiyat.FormClose(Sender: TObject;
  var Action: TCloseAction);
begin
  inherited;
  Action := caFree;
  fmTeknikServisFiyat := nil;
end;                               

procedure TfmTeknikServisFiyat.FormShow(Sender: TObject);
begin
  inherited;
  OpenQueryOnDataSet(aqStokkod.SQL.Text, aqStokkod);
  OpenQueryOnDataSet(Tekniktipi.SQL.Text, Tekniktipi);
  OpenQueryOnDataSet(aqEntry.SQL.Text, aqEntry);
end;

procedure TfmTeknikServisFiyat.btDuzeltClick(Sender: TObject);
begin
  inherited;
  aqEntry.Edit;
end;

procedure TfmTeknikServisFiyat.btKaydetClick(Sender: TObject);
begin
  inherited;
  if aqEntry.State in [dsedit, dsinsert] then
    aqEntry.Post;
  aqEntry.UpdateBatch;
end;

end.
